package com.wei.service.impl;

import com.spring.BeanNameAware;
import com.spring.InitializingBean;
import com.spring.annotation.Autowired;
import com.spring.annotation.Component;
import com.spring.annotation.WeiValue;
import com.wei.service.OrderService;
import com.wei.service.UserService;

/**
 * @author ALTHUMIC
 */
@Component("userService")
public class UserServiceImpl implements UserService, InitializingBean, BeanNameAware {
    @Autowired
    private OrderService orderService;

    @WeiValue("fuck u")
    private String value;

    private String beanName;

    @Override
    public void test() {
        System.out.println("UserServiceImpl test..." + "   orderService:" + orderService + "   value:" + value);
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println("init afterPropertiesSet...");
    }

    @Override
    public void setBeanName(String beanName) {
        this.beanName = beanName;
        System.out.println("setBeanName：" + beanName);
    }
}
